package com.lemt.sunmao.controller;

import com.lemt.sunmao.service.EsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/es")
public class EsController {

    @Autowired
    private EsService esService;
    /**
     * 解析数据(user)，放入es索引中--保存用户到es前需要先创建索引
     * */
    @GetMapping("/parseuser")
    public Boolean parsejavacourse() throws Exception {
        return esService.parseUser();
    }
}
